source comm.cfg

ssh ${MASTER} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"
ssh ${SLAVE1} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"
ssh ${SLAVE2} "if [ ! -d '${INSTALLDIR}' ]; then mkdir -p '${INSTALLDIR}'; fi"

scp comm.cfg ${MASTER}:${INSTALLDIR}
scp comm.cfg ${SLAVE1}:${INSTALLDIR}
scp comm.cfg ${SLAVE2}:${INSTALLDIR}
nohup ssh ${MASTER} "cd ${INSTALLDIR} && bash -s" < install.sh > ${MASTER}-redis.log 2>&1 &
nohup ssh ${SLAVE1} "cd ${INSTALLDIR} && bash -s" < install.sh > ${SLAVE1}-redis.log 2>&1 &
nohup ssh ${SLAVE2} "cd ${INSTALLDIR} && bash -s" < install.sh > ${SLAVE2}-redis.log 2>&1 &